package com.xuecheng.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.content.model.dto.CoursePreviewDto;
import com.xuecheng.content.model.po.CoursePublish;
import freemarker.template.TemplateException;

import java.io.IOException;

/**
 * @Author xiao
 * @Date 2024/12/11 16:57
 * @ClassName: CoursePublishService
 * @Description: 获取课程预览信息
 */
public interface CoursePublishService extends IService<CoursePublish> {

    /**
     * @param courseId
     * @return
     * @Desc: 根据课程id返回预览信息
     */
    public CoursePreviewDto getCoursePreviewInfo(Long courseId);

    /**
     * @description 提交审核
     * @param courseId  课程id
     * @return void
     * @author Mr.M
     * @date 2022/9/18 10:31
     */
    public void commitAudit(Long companyId,Long courseId);


    /**
     * @description 课程发布接口
     * @param companyId 机构id
     * @param courseId 课程id
     * @return void
     * @author Mr.M
     * @date 2022/9/20 16:23
     */
    public void publish(Long companyId,Long courseId);

    /**
     * @param courseId  课程id
     * @return
     * @Desc: 根据课程id生成模板
     */
    public void generateHtmlByTemplate(Long courseId) throws IOException, TemplateException;

    /**
     * @param courseId
     * @return
     * @Desc: 根据课程id返回课程
     */
    CoursePublish getCoursepublishById(Long courseId);
}
